import { useEffect, useState } from "react"
import { getAct } from "../../api/mm"
import "./ad.css"

function Ad() {

  const [act, getact] = useState("")

  useEffect(() => {
    const fetchData = async () => {
      const act = (await getAct()).data.data.content;
      getact(() => {
        return act
      })
    }

    fetchData()

    return () => {

    }
  }, [])
  return (
    <div dangerouslySetInnerHTML={{ __html: act }} className={"act"}></div>
  )
}

export default Ad